package com.three.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
* 余额
* @TableName tb_user_balance
*/
@TableName(value ="tb_user_balance")
@Data
public class UserBalance implements Serializable {

    /**
    * 余额ID
    */
    private Integer balanceId;
    /**
    * 店铺id，外键关联电偶表
    */
    private Integer storeId;
    /**
    * 用户ID，外键关联用户表
    */
    private Integer userId;
    /**
    * 账户余额，保留两位小数
    */
    private BigDecimal amount;
    /**
    * 余额记录创建时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime balanceTime;

    //余额
    @TableField(exist = false)
    private BigDecimal balance;


}
